-- GENERATED SPELL FOR [Emeraldon Tree Warder] --


function spell0_12475(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(20654,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12475', 15000, 1)
end

function spell1_12475(pUnit, Event) --@Faerie Fire,n/a--
pUnit:FullCastSpellOnTarget(20656,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12475', 2000, 1)
end

function Sorts_12475(pUnit, Event)
local choix_sorts_12475 = math.random(0, 1)
if choix_sorts_12475 == 0 then
pUnit:RegisterEvent('spell0_12475', 1, 1)
end
if choix_sorts_12475 == 1 then
pUnit:RegisterEvent('spell1_12475', 1, 1)
end
end

function mob12475_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12475', math.random(1500, 3000), 1)
end

function mob12475_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12475_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12475_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12475, 1, 'mob12475_Action')
RegisterUnitEvent(12475, 2, 'mob12475_Leave')
RegisterUnitEvent(12475, 3, 'mob12475_Kill')
RegisterUnitEvent(12475, 4, 'mob12475_Die')
